package info.hexin.spring.annontion1;

import info.hexin.spring.annontion1.service.MyRpcService;
import info.hexin.spring.annontion1.service.MyRpcServiceImpl;
import org.springframework.aop.support.AopUtils;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * Created by infi.he on 2016/3/7.
 */
public class Main {
    public static void main(String[] args) {
        ClassPathXmlApplicationContext applicationContext = new ClassPathXmlApplicationContext("app.xml");
        MyRpcServiceImpl myRpcService = applicationContext.getBean(MyRpcServiceImpl.class);
        System.out.println("xxxxxxxxxxxx");
        System.out.println("class >>>> " + myRpcService.getClass());
        System.out.println(AopUtils.isAopProxy(myRpcService));
        System.out.println(AopUtils.getTargetClass(myRpcService));
        System.out.println("xxxxxxxxxxxx");
        myRpcService.test1();
        myRpcService.test2();
    }
}